import request from '../utils/request'

export function getById(id) {
  return request.get(`/users/${id}`)
}

export function getList(params) {
  return request.get('/users', { params: params })
}
export function addUser(data) {
  return request.post('/users', data)
}

export function modUser(id, data) {
  return request.put(`/users/${id}`, data)
}
export function deleteUser(id){
  return request.delete(`/users/${id}`)
}

export function login(data){
  return request.post('/users/token',data)
}